﻿using Gx.Common;
using Gx.Model.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Gx.ZhiChengXianWei.Controllers
{
    public class LkGlobalController : Controller
    {
        /// <summary>
        /// 获取计费单位
        /// </summary>
        /// <returns></returns>
        public JsonResult GetChargeUnitList()
        {
            var chargeUnitList = EnumHelper.GetEnumList<ChargeUnit>();
            return Json(chargeUnitList, JsonRequestBehavior.AllowGet);
        }

        /// <summary>
        /// 获取冷藏算法
        /// </summary>
        /// <returns></returns>
        public JsonResult GetColdAlgorithmList()
        {
            var coldAlgorithmList = EnumHelper.GetEnumList<ColdAlgorithm>();
            return Json(coldAlgorithmList, JsonRequestBehavior.AllowGet);
        }

        /// <summary>
        /// 获取包仓算法
        /// </summary>
        /// <returns></returns>
        public JsonResult GetStoreAlgorithmList()
        {
            var storeAlgorithmList = EnumHelper.GetEnumList<StoreAlgorithm>();
            return Json(storeAlgorithmList, JsonRequestBehavior.AllowGet);
        }

        /// <summary>
        /// 获取包仓类型
        /// </summary>
        /// <returns></returns>
        public JsonResult GetStoreTypeList()
        {
            var storeTypeList = EnumHelper.GetEnumList<StoreType>();
            return Json(storeTypeList, JsonRequestBehavior.AllowGet);
        }

        /// <summary>
        /// 获取支付方式
        /// </summary>
        /// <returns></returns>
        public JsonResult GetPayTypeList()
        {
            var payTypeList = EnumHelper.GetEnumList<PayType>();
            return Json(payTypeList, JsonRequestBehavior.AllowGet);
        }

        //获取银行列表
        public JsonResult GetBanksList()
        {
            var banksList = EnumHelper.GetEnumList<Banks>();
            return Json(banksList, JsonRequestBehavior.AllowGet);
        }
    }
}
